package br.com.algarmidia.controllers;

import java.security.Principal;

import javax.servlet.http.HttpServletRequest;

import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.Resource;

@Resource
public class AdminController {

    private HttpServletRequest request;

    public AdminController(HttpServletRequest request) {
        this.request = request;
    }

    @Path("/admin")
    public void index() {
        Principal user = request.getUserPrincipal();
        System.out.println(user.getName());
    }
}